namespace ASPNET.StarterKit.IssueTracker.DataAccessLayer
{
    using ASPNET.StarterKit.IssueTracker.BusinessLogicLayer;
    using System;

    public class DataAccessLayerBaseClassHelper
    {
        public static DataAccessLayerBaseClass GetDataAccessLayer()
        {
            Type trp = Type.GetType(Globals.DataAccessType, true);
            if (trp.BaseType != Type.GetType("ASPNET.StarterKit.IssueTracker.DataAccessLayer.DataAccessLayerBaseClass"))
            {
                throw new Exception("Data Access Layer does not inherit DataAccessLayerBaseClass!");
            }
            return (DataAccessLayerBaseClass) Activator.CreateInstance(trp);
        }
    }
}

